home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmMain
- BorderStyle = 3 'Fixed Dialog
- Caption = " VB 5.0 Recent Project Remover v.1.00"
- ClientHeight = 3960
- ClientLeft = 150
- ClientTop = 435
- ClientWidth = 6375
- Icon = "frmMain.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3960
- ScaleWidth = 6375
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin VB.ListBox lstProj
- Height = 2400
- ItemData = "frmMain.frx":08CA
- Left = 120
- List = "frmMain.frx":08CC
- TabIndex = 0
- Top = 360
- Width = 6135
- End
- Begin VB.CommandButton cmdOK
- Caption = "OK"
- Height = 255
- Left = 240
- TabIndex = 9
- Top = 2040
- Width = 615
- End
- Begin VB.CommandButton cmdClean
- Caption = "&Clean All"
- Height = 375
- Left = 3120
- TabIndex = 7
- Top = 3480
- Width = 975
- End
- Begin VB.CommandButton cmdExit
- Caption = "E&xit"
- Height = 375
- Left = 5280
- TabIndex = 2
- Top = 3480
- Width = 975
- End
- Begin VB.CommandButton cmdRemove
- Caption = "&Remove"
- Enabled = 0 'False
- Height = 375
- Left = 4200
- TabIndex = 1
- Top = 3480
- Width = 975
- End
- Begin VB.TextBox Text1
- Height = 2415
- Left = 120
- Locked = -1 'True
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 8
- Top = 360
- Width = 6135
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- BorderStyle = 1 'Fixed Single
- Caption = "Project Path"
- ForeColor = &H80000002&
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 12
- Top = 2880
- Width = 6120
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- BorderStyle = 1 'Fixed Single
- ForeColor = &H80000002&
- Height = 255
- Index = 1
- Left = 1800
- TabIndex = 11
- Top = 120
- Width = 4440
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- BorderStyle = 1 'Fixed Single
- Caption = "Project Name"
- ForeColor = &H80000002&
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 10
- Top = 120
- Width = 1680
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- Caption = "projects referenced in the registry."
- Height = 195
- Left = 600
- TabIndex = 6
- Top = 3480
- Width = 2385
- End
- Begin VB.Label lblNumProjs
- BackColor = &H8000000C&
- BorderStyle = 1 'Fixed Single
- Caption = " 0"
- ForeColor = &H80000009&
- Height = 255
- Left = 120
- TabIndex = 5
- Top = 3480
- Width = 375
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "Project Path:"
- Height = 195
- Left = 120
- TabIndex = 4
- Top = 2910
- Width = 915
- End
- Begin VB.Label lblPath
- BackColor = &H8000000C&
- BorderStyle = 1 'Fixed Single
- ForeColor = &H80000002&
- Height = 255
- Left = 120
- TabIndex = 3
- Top = 3120
- Width = 6135
- End
- Begin VB.Menu mnuFile
- Caption = "&File"
- Begin VB.Menu mnuRemove
- Caption = "&Remove Project"
- Enabled = 0 'False
- End
- Begin VB.Menu Sep2
- Caption = "-"
- End
- Begin VB.Menu mnuExit
- Caption = "&Exit"
- End
- End
- Begin VB.Menu mnuHelp
- Caption = "&Help"
- Begin VB.Menu mnuRemoveHelp
- Caption = "&Removal Help"
- End
- Begin VB.Menu Sep1
- Caption = "-"
- End
- Begin VB.Menu mnuABout
- Caption = "&About Project Remover v.1.00"
- End
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- ' reference the Class file
- Private WithEvents Remover As cRemover
- Attribute Remover.VB_VarHelpID = -1
- Private Sub cmdClean_Click()
- Remover.ClearAll lstProj
- lstProj.Clear
- lblNumProjs = " " & Remover.NumProjs(lstProj)
- End Sub
- Private Sub cmdExit_Click()
- Unload Me
- End Sub
- Private Sub cmdOK_Click()
- lstProj.Visible = True
- End Sub
- Private Sub cmdRemove_Click()
- On Error Resume Next
- ' remove the Project from the List Box
- lstProj.RemoveItem lstProj.ListIndex
- ' remove the reference from the registry
- Remover.Remove lblPath
- 'update the counter label
- lblNumProjs = " " & Remover.NumProjs(lstProj)
- lblPath = ""
- cmdRemove.Enabled = False
- mnuRemove.Enabled = False
- End Sub
- Private Sub Form_Load()
- Set Remover = New cRemover
-
- ' load up the ListBOx
- Remover.GetProjs lstProj
- lblNumProjs = " " & Remover.NumProjs(lstProj)
- End Sub
- Private Sub lstProj_Click()
- Remover.GetSelected lstProj.ListIndex, _
- lstProj.List(lstProj.ListIndex), _
- lblPath
- cmdRemove.Enabled = True
- mnuRemove.Enabled = True
- End Sub
- Private Sub lstProj_DblClick()
- cmdRemove_Click
- End Sub
- Private Sub mnuABout_Click()
- MsgBox " A very simple application designed to clean out " & vbCrLf & _
- "old projects from the VB 5.0 Recent Project List." & vbCrLf & vbCrLf & _
- "Written by DCroft Aug 28th, 1999."
- End Sub
- Private Sub mnuExit_Click()
- Unload Me
- End Sub
- Private Sub mnuRemove_Click()
- cmdRemove_Click
- End Sub
- Private Sub mnuRemoveHelp_Click()
- DoHelp
- End Sub
- Private Sub DoHelp()
- Dim Msg As String
- Msg = " To remove a project from the VB 5.0 Recent Project List, select " & _
- "the project to be removed. Click the remove button. To remove all " & _
- "projects at once, click the Clean All button."
- lstProj.Visible = False
- Text1 = Msg
- End Sub
- Private Sub Remover_NoMoreProjects()
- ' ther are no projects left so disable the CLean All Button
- cmdClean.Enabled = False
- End Sub
-